cd C:\Political_predispositions
log using log_political_predisposition, text replace

********************************************************************
***Analyses for "Political Predispositions, not Popularity...*******
********************************************************************
***This do-file is made for Stata 15********************************
********************************************************************

****************************************************************************************************************************************************
***INSTALLING PACKAGES******************************************************************************************************************************
****************************************************************************************************************************************************
	
*requires the package "grc1leg" in order to produce the combined figures
net install grc1leg2.pkg, from("http://digital.cgdev.org/doc/stata/MO/Misc")

*requires the package "blindschemes" in order to produce the figures
*ssc install blindschemes
set scheme plotplain

*Setting the font in the figures:
graph set window fontface "Gill Sans MT"

***************************************************************************************************************************************************
***Getting the data********************************************************************************************************************************
***************************************************************************************************************************************************
clear all
set more off

use "C:\Political_predispositions\170411 Final dataset SoMePol DEL1.dta"


**********************************************************************************************************************************************************
***Recoding, Creating variables and Attaching Value Labels************************************************************************************************
**********************************************************************************************************************************************************

*Vote
recode fvalg_mo (1=1) (else=0), gen(vote_S)
recode fvalg_mo (8=1) (else=0), gen(vote_V)

*Previous vote
recode fvalg15 (1=1) (else=0), gen(vote_pr_S)
recode fvalg15 (8=1) (else=0), gen(vote_pr_V)

**LEFT_RIGHT - placement of self and parties**
recode s_47 s_12 s_13 s_14 s_15 s_16 s_17 s_18 s_19 s_20 s_21 (12=.)
gen LR_respondent=s_47-1
gen LR_A=s_12-1 
gen LR_B=s_13-1
gen LR_C=s_14-1 
gen LR_D=s_15-1 
gen LR_F=s_16-1 
gen LR_I=s_17-1 
gen LR_O=s_18-1 
gen LR_V=s_19-1 
gen LR_Ø=s_20-1 
gen LR_Å=s_21-1 

by fvalg_mo, sort: egen fvalg_mo_median = median(LR_respondent) //respondents not placing themselves on LR are assigned the median value among respondents with same vote choice
replace LR_respondent=fvalg_mo_median if LR_respondent==.

**Immigration is a threat**
recode s_1 (99=.), gen(immigration_is_threat)

**Interest in politics**
recode s_22 (12=.), gen(uns_interest)
gen interest=(uns_interest-1)/10

**Party sympathy**
recode s_24 s_25 s_26 s_27 s_28 s_29 s_30 s_31 s_32 s_33 (12=.)
gen PS_A=s_24-1
gen PS_B=s_25-1
gen PS_C=s_26-1
gen PS_D=s_27-1
gen PS_F=s_28-1
gen PS_I=s_29-1
gen PS_O=s_30-1
gen PS_V=s_31-1
gen PS_ENH=s_32-1
gen PS_AA=s_33-1
	
	sum PS_A
	gen PS_A_minus_sd=(r(mean)-r(sd))
	gen PS_A_plus_sd=(r(mean)+r(sd))

	sum PS_V
	gen PS_V_minus_sd=(r(mean)-r(sd))
	gen PS_V_plus_sd=(r(mean)+r(sd))

	
**Party leader sympathy**
recode s_202 s_209 s_210 s_211 s_212 s_213 s_214 s_215 s_216 s_217 (12=.)
gen PLS_MetteF=s_202-1 
gen PLS_MortenO=s_209-1
gen PLS_SorenP= s_210-1
gen PLS_PernilleV=s_211-1
gen PLS_PiaOD=s_212-1
gen PLS_AndersS=s_213-1
gen PLS_KristianT=s_214-1
gen PLS_LarsL=s_215-1
gen PLS_PernilleS=s_216-1
gen PLS_UffeE=s_217-1

**Talking politics**
recode s_23 (9=.), gen(uns_talkingpolitics)
gen talkingpolitics=(8-uns_talkingpolitics)/7 //

**External Efficacy**
recode s_4 s_36 s_35 s_9 s_7 (99=.)
alpha s_4 s_36 s_35 s_9 s_7, item // s_35 has negative impact on scale reliability and is therefore removed
alpha s_4 s_36 s_9 s_7 , item reverse(s_4 s_9 s_7) gen(uns_external_efficacy)
gen external_efficacy=(uns_external_efficacy+5)/10

**Internal Efficacy**
recode s_34 s_10 s_8 s_6 s_5 (99=.)
alpha s_34 s_10 s_8 s_6 s_5, item gen(uns_internal_efficacy)
gen internal_efficacy=(uns_internal_efficacy+5)/10

**Need for Closure**
recode s_37 s_52 s_51 s_50 s_49 s_48 s_46 s_45 s_44 s_43 s_42 s_41 s_40 s_39 s_38 (99=.)
alpha s_37 s_52 s_51 s_50 s_49 s_48 s_46 s_45 s_44 s_43 s_42 s_41 s_40 s_39 s_38 , item gen(uns_NFCLOSURE)
gen NFCLOSURE=(uns_NFCLOSURE-1)/5
egen float NFCLOSURE_split = cut(NFCLOSURE), group(2) icodes //median split for quick calculations

**Need for Cognition**
recode s_53 s_54 s_59 s_58 s_56 s_55 (99=.)
alpha s_53 s_54 s_59 s_58 s_56 s_55, item reverse(s_59 s_58 s_56) gen(uns_NFCOGNITION)
gen NFCOGNITION=((uns_NFCOGNITION+3)/8)

**Need to Evaluate
recode s_68 s_67 s_66 s_65 s_64 s_63 s_62 s_61 s_60 (99=.)
alpha s_68 s_67 s_66 s_65 s_64 s_63 s_62 s_61 s_60, item gen(uns_NTEVALUATE)
gen NTEVALUATE=(uns_NTEVALUATE+3)/8

recode s_70 (1=0)(2=1) (3=2) (4=3) (5=4) (6=5) (7=6) (8=7) (99=.), gen("Newspaper_use")
recode s_71 (1=0)(2=1) (3=2) (4=3) (5=4) (6=5) (7=6) (8=7) (99=.), gen("TV_News_use")

**Minutes on facebook
gen Minutes_on_Facebook=minut2
recode Minutes_on_Facebook (120/4000=120), gen(Minutes_on_facebook_winsorized)

**Disagreement with friends on Facebook (never-always)
recode s_98 (99=.), gen(Facebook_disagree) 

**Self censorship on Facebook
recode s_111 (99=.), gen(Facebook_selfcensor)

**Female
recode koentot (1=0) (2=1), gen(female)

**Education
recode udd_new (1/5 = 0) (6/8 = 1), gen(somecollege)

*********************************************************************************************
***EXPERIMENT********************************************************************************
*********************************************************************************************


*******************************
***EXPERIMENTAL TREATMENTS*****


***SPONSORSHIP****************************************************

***IMMIGRANTS ***
gen immigrants_MetteF=.
recode immigrants_MetteF (.=1) if mf31_1!=. | mf32_1!=. | mf33_1!=. | mf34_1!=. | mf35_1!=. | mf36_1!=. 
recode immigrants_MetteF (.=0) if ll41_!=. | ll42_1!=. | ll43_1!=. | ll44_1!=. | ll45_1!=. | ll46_1!=. 



***VETERANS ***
gen vet_MetteF=.
recode vet_MetteF (.=1) if mf11_1!=. | mf12_1!=. | mf13_1!=. | mf14_1!=. | mf15_1!=. | mf16_1!=. | mf11a_1!=. | mf12a_1!=. | mf13a_1!=. | mf14a_1!=. | mf15a_1!=. | mf16a_1!=.  
recode vet_MetteF (.=0) if ll21_1!=. | ll22_1!=. | ll23_1!=. | ll24_1!=. | ll25_1!=. | ll26_1!=. | ll21a_1!=. | ll22a_1!=. | ll23a_1!=. | ll24a_1!=. | ll25a_1!=. | ll26a_1!=.  


***NUMBER OF LIKES*************************************************

***Immigrants***
gen many_likes_immi=. 
recode many_likes_immi (.=1) if mf31_1!=. |  mf33_1!=. |  mf35_1!=. |  ll41_!=. |  ll43_1!=. |  ll45_1!=.  
recode many_likes_immi (.=0) if mf32_1!=. |  mf34_1!=. |  mf36_1!=. |  ll42_1!=. |  ll44_1!=. |  ll46_1!=.  


***Veterans***
gen many_likes_vet=. 
recode many_likes_vet (.=1) if mf11_1!=. |  mf13_1!=. |  mf15_1!=. |  ll21_1!=. |  ll23_1!=. |  ll25_1!=. | mf11a_1!=. |  mf13a_1!=. |  mf15a_1!=. |  ll21a_1!=. |  ll23a_1!=. |  ll25a_1!=.  
recode many_likes_vet (.=0) if mf12_1!=. |  mf14_1!=. |  mf16_1!=. |  ll22_1!=. |  ll24_1!=. |  ll26_1!=. | mf12a_1!=. |  mf14a_1!=. |  mf16a_1!=. |  ll22a_1!=. |  ll24a_1!=. |  ll26a_1!=.  


***COMMENTS**********************************************************
 
 ***Immigrants***
gen comments_immi=.
recode comments_immi (.=0) if mf31_1!=. |  mf32_1!=. |  ll41_!=.  |  ll42_1!=.  //NOTE: the variable "mf41_" is named without a finishing "1" in the original dataset) 
recode comments_immi (.=1) if mf33_1!=. |  mf34_1!=. |  ll43_1!=. |  ll44_1!=. 
recode comments_immi (.=2) if mf35_1!=. |  mf36_1!=. |  ll45_1!=. |  ll46_1!=. 


***Veterans***
gen comments_vet=.
recode comments_vet (.=0) if mf11_1!=. |  mf12_1!=. |  ll21_1!=. |  ll22_1!=. |  mf11a_1!=. |  mf12a_1!=. |  ll21a_1!=. |  ll22a_1!=.  
recode comments_vet (.=1) if mf13_1!=. |  mf14_1!=. |  ll23_1!=. |  ll24_1!=. |  mf13a_1!=. |  mf14a_1!=. |  ll23a_1!=. |  ll24a_1!=.  
recode comments_vet (.=2) if mf15_1!=. |  mf16_1!=. |  ll25_1!=. |  ll26_1!=. |  mf15a_1!=. |  mf16a_1!=. |  ll25a_1!=. |  ll26a_1!=. 


label define comments_label 0 "No comments" 1 "Positive Comments" 2 "Negative Comments"
label values comments_immi comments_vet


********************************************************************
***EXPERIMENTAL DV'S************************************************


***FACEBOOK BEHAVIOR************************************************

**liking** 
gen like_vet_MF=max(mf11_1, mf12_1, mf13_1, mf14_1, mf15_1, mf16_1, mf11a_1, mf12a_1, mf13a_1, mf14a_1, mf15a_1, mf16a_1)
gen like_vet_LL=max(ll21_1, ll22_1, ll23_1, ll24_1, ll25_1, ll26_1, ll21a_1, ll22a_1, ll23a_1, ll24a_1, ll25a_1, ll26a_1)
gen like_vet_both=max(like_vet_MF, like_vet_LL)

gen like_immi_MF=max(mf31_1, mf32_1, mf33_1, mf34_1, mf35_1, mf36_1)
gen like_immi_LL=max(ll41_, ll42_1, ll43_1, ll44_1, ll45_1, ll46_1)   //NOTE: the variable "mf41_" is named without a finishing "1" in the original dataset)	
gen like_immi_both=max(like_immi_MF , like_immi_LL)

label define reaction 1 "Yes" 2 "Maybe" 3 "No"
label values like_vet_MF like_vet_LL like_vet_both like_immi_MF like_immi_LL like_immi_both reaction

recode like_immi_both (1=1 "Yes") (2 3=0 "Maybe/No"), gen(like_immi_both_yes)
recode like_immi_both (3=1 "No") (1 2=0 "Maybe/yes") , gen(like_immi_both_no)

recode like_vet_both (1=1 "Yes") (2 3=0 "Maybe/No"), gen(like_vet_both_yes)
recode like_vet_both (3=1 "No") (1 2=0 "Maybe/yes") , gen(like_vet_both_no)


**Comment** 
gen comment_vet_MF=max(mf11_2, mf12_2, mf13_2, mf14_2, mf15_2, mf16_2, mf11a_2, mf12a_2, mf13a_2, mf14a_2, mf15a_2, mf16a_2)
gen comment_vet_LL=max(ll21_2, ll22_2, ll23_2, ll24_2, ll25_2, ll26_2, ll21a_2, ll22a_2, ll23a_2, ll24a_2, ll25a_2, ll26a_2)
gen comment_vet_both=max(comment_vet_MF, comment_vet_LL)

gen comment_immi_MF=max(mf31_2, mf32_2, mf33_2, mf34_2, mf35_2, mf36_2)
gen comment_immi_LL=max(ll41_2, ll42_2, ll43_2, ll44_2, ll45_2, ll46_2)   
gen comment_immi_both=max(comment_immi_MF , comment_immi_LL)


label values comment_vet_MF comment_vet_LL comment_vet_both comment_immi_MF comment_immi_LL comment_immi_both reaction

recode comment_immi_both (1=1 "Yes") (2 3=0 "Maybe/No"), gen(comment_immi_both_yes)
recode comment_immi_both (3=1 "No") (1 2=0 "Maybe/yes") , gen(comment_immi_both_no)

recode comment_vet_both (1=1 "Yes") (2 3=0 "Maybe/No"), gen(comment_vet_both_yes)
recode comment_vet_both (3=1 "No") (1 2=0 "Maybe/yes") , gen(comment_vet_both_no)


**Share** 
gen share_vet_MF=max(mf11_3, mf12_3, mf13_3, mf14_3, mf15_3, mf16_3, mf11a_3, mf12a_3, mf13a_3, mf14a_3, mf15a_3, mf16a_3)
gen share_vet_LL=max(ll21_3, ll22_3, ll23_3, ll24_3, ll25_3, ll26_3, ll21a_3, ll22a_3, ll23a_3, ll24a_3, ll25a_3, ll26a_3)
gen share_vet_both=max(share_vet_MF, share_vet_LL)

gen share_immi_MF=max(mf31_3, mf32_3, mf33_3, mf34_3, mf35_3, mf36_3)
gen share_immi_LL=max(ll41_3, ll42_3, ll43_3, ll44_3, ll45_3, ll46_3)   
gen share_immi_both=max(share_immi_MF , share_immi_LL)


label values share_vet_MF share_vet_LL share_vet_both share_immi_MF share_immi_LL share_immi_both reaction
	
recode share_immi_both (1=1 "Yes") (2 3=0 "Maybe/No"), gen(share_immi_both_yes)
recode share_immi_both (3=1 "No") (1 2=0 "Maybe/yes") , gen(share_immi_both_no)

recode share_vet_both (1=1 "Yes") (2 3=0 "Maybe/No"), gen(share_vet_both_yes)
recode share_vet_both (3=1 "No") (1 2=0 "Maybe/yes") , gen(share_vet_both_no)



***POLICY ATTITUDES************************************************

**Veterans
recode vet1kr (8=.)
gen vet1kr_std=((vet1kr-1)*4/6)+1
recode vet1uds1 vet1uds2 vet1uds3 vet1uds4 vet1uds5 (99=.)
recode vet1uds2 (5=1) (4=2) (3=3) (2=4) (1=5), gen(vet1uds2_rev)
alpha vet1kr_std vet1uds1 vet1uds2_rev vet1uds3 vet1uds4 vet1uds5, item gen(uns_veterans)
gen veterans=(uns_veterans-1)/4

**immigrants
recode indkr (8=.)
gen indkr_std=((indkr-1)*4/6)+1
recode induds1 induds2 induds3 induds4 induds5 (99=.)
recode induds1 (5=1) (4=2) (3=3) (2=4) (1=5), gen(induds1_rev)
recode induds3 (5=1) (4=2) (3=3) (2=4) (1=5), gen(induds3_rev)
recode induds4 (5=1) (4=2) (3=3) (2=4) (1=5), gen(induds4_rev)
recode induds5 (5=1) (4=2) (3=3) (2=4) (1=5), gen(induds5_rev)
alpha indkr_std induds1_rev induds2 induds3_rev induds4_rev induds5_rev, item gen(uns_immigrants)
gen immigrants=(uns_immigrants-1)/4 



**********************************************************************************************************************************************************
***Analyses***********************************************************************************************************************************************
**********************************************************************************************************************************************************

***Descriptives***
tab female
sum age
tab somecollege
sum LR_respondent
sum PS_A 
sum PS_V
sum veterans
sum immigrants

*Party sympathy is more important than party leader sympathy for vote choice:
	corr vote_S PLS_MetteF 
	corr vote_S PS_A
	pwcorr vote_S PLS_MetteF PS_A

	corr vote_V PLS_LarsL
	corr vote_V PS_V
	pwcorr vote_V PLS_LarsL PS_V
	
	*(the same is true for previous vote)
	corr vote_pr_S PLS_MetteF 
	corr vote_pr_S PS_A
	
	corr vote_pr_V PLS_LarsL
	corr vote_pr_V PS_V
	
*Balance
logit female i.immigrants_MetteF i.many_likes_immi i.comments_immi //model insignificant
logit female i.vet_MetteF i.many_likes_vet i.comments_vet //model insignificant

logit somecollege i.immigrants_MetteF i.many_likes_immi i.comments_immi //model insignificant
logit somecollege i.vet_MetteF i.many_likes_vet i.comments_vet //model insignificant

reg age i.immigrants_MetteF i.many_likes_immi i.comments_immi //model insignificant
reg age i.vet_MetteF i.many_likes_vet i.comments_vet //model insignificant

reg LR_respondent i.immigrants_MetteF i.many_likes_immi i.comments_immi //model insignificant
reg LR_respondent i.vet_MetteF i.many_likes_vet i.comments_vet //model insignificant





***Experimental results**********************************************************************************

***Party sympathy***
pwcorr PS_A PS_V, sig obs //Sympathy for the two parties are weakly correlated

***Liking***
	*Vets
	logit like_vet_both_yes i.vet_MetteF##c.PS_A  // i.vet_MetteF##c.PS_V i.many_likes_vet i.comments_vet
	eststo m1a
	*Comparing respondents -1sd and +1sd
	local PS_A_minus_sd=PS_A_minus_sd
	local PS_A_plus_sd=PS_A_plus_sd
	margins, at(vet_MetteF=(1) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //significant
	margins, at(vet_MetteF=(0) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //not significant
	estimates restore m1a 
	margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
	eststo like_vet_ps_a_mf
	estimates restore m1a 
	margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
	eststo like_vet_ps_a_ll
	coefplot 	(like_vet_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.05) label("Post from {it:Social Democrats}")) /// ) ///
				(like_vet_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.05) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Propability of" "Liking the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
				ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12) size(medium)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(like_vet_ps_A, replace) fxsize(100)
	logit like_vet_both_yes i.vet_MetteF##c.PS_V 
	estimates store m1b
	*Comparing respondents -1sd and +1sd
	local PS_V_minus_sd=PS_V_minus_sd
	local PS_V_plus_sd=PS_V_plus_sd
	margins, at(vet_MetteF=(1) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) //not significant
	margins, at(vet_MetteF=(0) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) //significant
	estimates restore m1b 
	margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
	eststo like_vet_ps_v_mf
	estimates restore m1b 
	margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
	eststo like_vet_ps_v_ll
	coefplot 	(like_vet_ps_v_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.05) label("Post from {it:Social Democrats}")) /// ) ///
				(like_vet_ps_v_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.05) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
				ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(like_vet_ps_V, replace) fxsize(90)
	*Immigrants
	logit like_immi_both_yes i.immigrants_MetteF##c.PS_A   
	eststo m2a
	*Comparing respondents -1sd and +1sd
	local PS_A_minus_sd=PS_A_minus_sd
	local PS_A_plus_sd=PS_A_plus_sd
	margins, at(immigrants_MetteF=(1) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //significant
	margins, at(immigrants_MetteF=(0) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //significant, but small in magnitude
	estimates restore m2a	
	margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
	eststo like_immi_ps_a_mf
	estimates restore m2a
	margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
	eststo like_immi_ps_a_ll
	coefplot 	(like_immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.05) label("Post from {it:Social Democrats}")) /// ) ///
				(like_immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.05) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Probability of" "Liking the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
				ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(like_immi_ps_A, replace) fxsize(100)		
	logit like_immi_both_yes i.immigrants_MetteF##c.PS_V 
	estimates store m2b
	local PS_V_minus_sd=PS_V_minus_sd
	local PS_V_plus_sd=PS_V_plus_sd
	*Comparing respondents -1sd and +1sd
	margins, at(immigrants_MetteF=(1) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) //not significant
	margins, at(immigrants_MetteF=(0) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) //significant
	estimates restore m2b
	margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
	eststo like_immi_ps_a_mf
	estimates restore m2b
	margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
	eststo like_immi_ps_a_ll
	coefplot 	(like_immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.05) label("Post from {it:Social Democrats}")) /// ) ///
				(like_immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.05) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
				ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(like_immi_ps_V, replace)	fxsize(90)		
	graph close
	*FIGURE 1: Liking as a Function of Party Sympathy
	grc1leg2  like_vet_ps_A like_vet_ps_V like_immi_ps_A like_immi_ps_V	, ycommon pos(12) title("" , size(medlarge)) note("Note: Estimates with 95% confidence intervals (n=2,802/2,803)")
	graph export FIGURE_1.png, replace		

		
***Commenting***
	*Vets
	logit comment_vet_both_yes i.vet_MetteF##c.PS_A
	eststo m3a
	*Comparing respondents -1sd and +1sd
	local PS_A_minus_sd=PS_A_minus_sd
	local PS_A_plus_sd=PS_A_plus_sd
	margins, at(vet_MetteF=(1) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //marginally significant
	margins, at(vet_MetteF=(0) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //not significant
	estimates restore m3a
	margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
	eststo comment_vet_ps_a_mf
	estimates restore m3a 
	margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
	eststo comment_vet_ps_a_ll
	coefplot 	(comment_vet_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.05) label("Post from {it:Social Democrats}")) /// ) ///
				(comment_vet_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.05) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Probability of" "Commenting the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
				ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12) size(medium)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(comment_vet_ps_A, replace) fxsize(100)
	logit comment_vet_both_yes i.vet_MetteF##c.PS_V
	eststo m3b
	*Comparing respondents -1sd and +1sd
	local PS_V_minus_sd=PS_V_minus_sd
	local PS_V_plus_sd=PS_V_plus_sd
	margins, at(vet_MetteF=(1) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) //not significant
	margins, at(vet_MetteF=(0) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) //not significant
	estimates restore m3b
	margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
	eststo comment_vet_ps_v_mf
	estimates restore m3b		
	margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
	eststo comment_vet_ps_v_ll
	coefplot 	(comment_vet_ps_v_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.05) label("Post from {it:Social Democrats}")) /// ) ///
				(comment_vet_ps_v_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.05) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
				ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12) size(medium)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(comment_vet_ps_V, replace) fxsize(90)
	*Immigrants
	logit comment_immi_both_yes i.immigrants_MetteF##c.PS_A
	eststo m4a
	*Comparing respondents -1sd and +1sd
	local PS_A_minus_sd=PS_A_minus_sd
	local PS_A_plus_sd=PS_A_plus_sd
	margins, at(immigrants_MetteF=(1) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //not significant
	margins, at(immigrants_MetteF=(0) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //not significant
	estimates restore m4a
	margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
	eststo comment_immi_ps_a_mf
	estimates restore m4a 
	margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
	eststo comment_immi_ps_a_ll
	coefplot 	(comment_immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
				(comment_immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Probability of" "Commenting the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
				ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(comment_immi_ps_A, replace)	fxsize(100)		
	logit comment_immi_both_yes i.immigrants_MetteF##c.PS_V
	eststo m4b	
	*Comparing respondents -1sd and +1sd
	local PS_V_minus_sd=PS_V_minus_sd
	local PS_V_plus_sd=PS_V_plus_sd
	margins, at(immigrants_MetteF=(1) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) // not significant
	margins, at(immigrants_MetteF=(0) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) // not significant
	estimates restore m4b
	margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
	eststo comment_immi_ps_a_mf
	estimates restore m4b 
	margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
	eststo comment_immi_ps_a_ll
	coefplot 	(comment_immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
				(comment_immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
				ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(comment_immi_ps_V, replace)	fxsize(90)		
	graph close
	*FIGURE 2: Commenting as a Function of Party Sympathy
	grc1leg2  comment_vet_ps_A comment_vet_ps_V comment_immi_ps_A comment_immi_ps_V , xsize(6) ycommon pos(12) title("", size(medlarge)) note("Note: Estimates with 95% confidence intervals (n=2,802/2,803)")
	graph export FIGURE_2.png, replace	
	
		
***Sharing***
	*Vets
	logit share_vet_both_yes i.vet_MetteF##c.PS_A  
	eststo m5a
	*Comparing respondents -1sd and +1sd
	local PS_A_minus_sd=PS_A_minus_sd
	local PS_A_plus_sd=PS_A_plus_sd
	margins, at(vet_MetteF=(1) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) // Significant
	margins, at(vet_MetteF=(0) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) //not significant
	estimates restore m5a
	margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
	eststo share_vet_ps_a_mf
	estimates restore m5a 
	margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
	eststo share_vet_ps_a_ll
	coefplot 	(share_vet_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
				(share_vet_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Probability of" "Sharing the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
				ylabel(0(.02).12,labsize(medium) gmin gmax) legend(row(1) pos(12) size(medium)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(share_vet_ps_A, replace) fxsize(100)
	logit share_vet_both_yes i.vet_MetteF##c.PS_V 
	eststo m5b	
	*Comparing respondents -1sd and +1sd
	local PS_V_minus_sd=PS_V_minus_sd
	local PS_V_plus_sd=PS_V_plus_sd
	margins, at(vet_MetteF=(1) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) // Not significant
	margins, at(vet_MetteF=(0) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) // Significant
	estimates restore m5b
	margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
	eststo share_vet_ps_v_mf
	estimates restore m5b 
	margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
	eststo share_vet_ps_v_ll
	coefplot 	(share_vet_ps_v_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
				(share_vet_ps_v_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
				ylabel(0(.02).12,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(share_vet_ps_V, replace) fxsize(90)
	*Immigrants
	logit share_immi_both_yes i.immigrants_MetteF##c.PS_A   
	eststo m6a
	*Comparing respondents -1sd and +1sd
	local PS_A_minus_sd=PS_A_minus_sd
	local PS_A_plus_sd=PS_A_plus_sd
	margins, at(immigrants_MetteF=(1) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) // Significant
	margins, at(immigrants_MetteF=(0) PS_A=(`PS_A_minus_sd' `PS_A_plus_sd')) pwcompare(groups effects) // Not significant
	estimates restore m6a
	margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
	eststo share_immi_ps_a_mf
	estimates restore m6a 
	margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
	eststo share_immi_ps_a_ll
	coefplot 	(share_immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
				(share_immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Probability of" "Sharing the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
				ylabel(0(.02).12,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(share_immi_ps_A, replace)	fxsize(100)		
	logit share_immi_both_yes i.immigrants_MetteF##c.PS_V   
	eststo m6b
	*Comparing respondents -1sd and +1sd
	local PS_V_minus_sd=PS_V_minus_sd
	local PS_V_plus_sd=PS_V_plus_sd
	margins, at(immigrants_MetteF=(1) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) // Not significant
	margins, at(immigrants_MetteF=(0) PS_V=(`PS_V_minus_sd' `PS_V_plus_sd')) pwcompare(groups effects) // Marginally significant
	estimate restore m6b
	margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
	eststo share_immi_ps_a_mf
	estimates restore m6b 
	margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
	eststo share_immi_ps_a_ll
	coefplot 	(share_immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
				(share_immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
				ylabel(0(.02).12,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(share_immi_ps_V, replace) fxsize(90)			
	graph close
	*FIGURE 3: Sharing as a function of Party Sympathy
	grc1leg2  share_vet_ps_A share_vet_ps_V share_immi_ps_A share_immi_ps_V , ycommon pos(12) title("", size(medlarge)) note("Note: Estimates with 95% confidence intervals (n=2,802/2,803)")
	graph export FIGURE_3.png, replace	


	*Robustness: Models where sympathy is treated as categorical
		
		***Liking***
		
		*Vets
		logit like_vet_both_yes i.vet_MetteF##i.PS_A
		eststo m1a_i
		margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
		eststo like_vet_ps_a_mf_i
		estimates restore m1a_i 
		margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
		eststo like_vet_ps_a_ll_i
		coefplot 	(like_vet_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(like_vet_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("Probability of" "Liking the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
					ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(like_vet_ps_A_i, replace) fxsize(100)
		logit like_vet_both_yes i.vet_MetteF##i.PS_V  
		eststo m1b_i
		margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
		eststo like_vet_ps_v_mf_i
		estimates restore m1b_i
		margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
		eststo like_vet_ps_v_ll_i
		coefplot 	(like_vet_ps_v_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(like_vet_ps_v_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
					ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(like_vet_ps_V_i, replace) fxsize(90)
		*Immigrants
		logit like_immi_both_yes i.immigrants_MetteF##i.PS_A  
		eststo m2a_i
		margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
		eststo like_immi_ps_a_mf_i
		estimates restore m2a_i 
		margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
		eststo like_immi_ps_a_ll_i
		coefplot 	(like_immi_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(like_immi_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("Probability of" "Liking the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
					ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(like_immi_ps_A_i, replace) fxsize(100)		
		logit like_immi_both_yes i.immigrants_MetteF##i.PS_V   
		eststo m2b_i
		margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
		eststo like_immi_ps_a_mf_i
		estimates restore m2b_i 
		margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
		eststo like_immi_ps_a_ll_I
		coefplot 	(like_immi_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(like_immi_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
					ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(like_immi_ps_V_i, replace)	fxsize(90)		
		graph close
		*FIGURE C1: Liking as a function of Party Sympathy
		grc1leg2  like_vet_ps_A_i like_vet_ps_V_i like_immi_ps_A_i like_immi_ps_V_i , ycommon pos(12) title("") note("Note: Estimates with 95% confidence intervals (n=2,802/2,803)")
		graph export FIGURE_C1.png, replace	

		
		***Commenting***
		*Vets
		logit comment_vet_both_yes i.vet_MetteF##i.PS_A  
		eststo m3a_i
		margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
		eststo comment_vet_ps_a_mf_i
		estimates restore m3a_i 
		margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
		eststo comment_vet_ps_a_ll_i
		coefplot 	(comment_vet_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(comment_vet_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("Probability of" "Commenting the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(comment_vet_ps_A_i, replace) fxsize(100)
		logit comment_vet_both_yes i.vet_MetteF##i.PS_V
		eststo m3b_i
		margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
		eststo comment_vet_ps_v_mf_i
		estimates restore m3b_i
		margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
		eststo comment_vet_ps_v_ll_i
		coefplot 	(comment_vet_ps_v_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(comment_vet_ps_v_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(comment_vet_ps_V_i, replace) fxsize(90)
		*Immigrants
		logit comment_immi_both_yes i.immigrants_MetteF##i.PS_A
		eststo m4a_i
		margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
		eststo comment_immi_ps_a_mf_i
		estimates restore m4a_i 
		margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
		eststo comment_immi_ps_a_ll_i
		coefplot 	(comment_immi_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(comment_immi_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("Probability of" "Commenting the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
					ylabel(0(.05).251,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(comment_immi_ps_A_i, replace) fxsize(100)		
		logit comment_immi_both_yes i.immigrants_MetteF##i.PS_V   
		eststo m4b_i
		margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
		eststo comment_immi_ps_a_mf_i
		estimates restore m4b_i 
		margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
		eststo comment_immi_ps_a_ll_I
		coefplot 	(comment_immi_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(comment_immi_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(comment_immi_ps_V_i, replace)	fxsize(90)		
		graph close
		*FIGURE C2: Commenting as a function of Party Sympathy
		grc1leg2  comment_vet_ps_A_i comment_vet_ps_V_i comment_immi_ps_A_i comment_immi_ps_V_i , ycommon pos(12) title("") note("Note: Estimates with 95% confidence intervals (n=2,802/2,803)")
		graph export FIGURE_C2.png, replace
		
		
	***Sharing***
		*Vets
		logit share_vet_both_yes i.vet_MetteF##i.PS_A 
		eststo m5a_i
		margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
		eststo share_vet_ps_a_mf_i
		estimates restore m5a_i 
		margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
		eststo share_vet_ps_a_ll_i
		coefplot 	(share_vet_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(share_vet_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("Probability of" "Sharing the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(share_vet_ps_A_i, replace) fxsize(100)
		logit share_vet_both_yes i.vet_MetteF##i.PS_V 
		eststo m5b_i
		margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
		eststo share_vet_ps_v_mf_i
		estimates restore m5b_i
		margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
		eststo share_vet_ps_v_ll_i
		coefplot 	(share_vet_ps_v_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(share_vet_ps_v_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(share_vet_ps_V_i, replace) fxsize(90)
		*Immigrants
		logit share_immi_both_yes i.immigrants_MetteF##i.PS_A  
		eststo m6a_i
		margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
		eststo share_immi_ps_a_mf_i
		estimates restore m6a_i 
		margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
		eststo share_immi_ps_a_ll_i
		coefplot 	(share_immi_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(share_immi_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("Probability of" "Sharing the post", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(share_immi_ps_A_i, replace) fxsize(100)		
		logit share_immi_both_yes i.immigrants_MetteF##i.PS_V   
		eststo m6b_i
		margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
		eststo share_immi_ps_a_mf_i
		estimates restore m6b_i 
		margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
		eststo share_immi_ps_a_ll_I
		coefplot 	(share_immi_ps_a_mf_i, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.02) label("Post from {it:Social Democrats}")) /// ) ///
					(share_immi_ps_a_ll_i, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.02) label("Post from {it:Venstre}")) ///)
					, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
					ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) omitted ///
					coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
					name(share_immi_ps_V_i, replace)	fxsize(90)		
		graph close
		*FIGURE C3: Sharing as a function of Party Sympathy
		grc1leg2  share_vet_ps_A_i share_vet_ps_V_i share_immi_ps_A_i share_immi_ps_V_i , ycommon pos(12) title("") note("Note: Estimates with 95% confidence intervals (n=2,802/2,803)")
		graph export FIGURE_C3.png, replace

	
	
		
***Policy Attitude***
***Here, we only look at the post regarding immigrants, because we have a pre-treatment item regarding this

	*Like
	logit like_immi_both_yes immigration_is_threat
	eststo m25
	margins, at(immigration_is_threat=(1(1)5)) post
	eststo like_immi_threat
	coefplot 	(like_immi_threat, msymbol(circle) msize(medlarge) mcolor(black)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) nokey) ///
								, vert ytitle("Probability of" "Liking the post", size(medium)) xtitle("Policy position") title("Continous model", size(large)) ///
				ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(like_immi_threat, replace)
	logit like_immi_both_yes i.immigration_is_threat
	eststo m26
	margins, at(immigration_is_threat=(1(1)5)) pwcompare(groups effects)
	margins, at(immigration_is_threat=(1(1)5)) post
	eststo like_immi_threat_ind
	coefplot 	(like_immi_threat_ind, msymbol(circle) msize(medsmall) mcolor(black)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) nokey) ///
								, vert ytitle("Probability of" "Liking the post", size(medium)) xtitle("Policy position") title("Categorial model", size(large)) ///
				ylabel(0(.1).5,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(like_immi_threat_ind, replace)
				
	*comment
	logit comment_immi_both_yes immigration_is_threat
	eststo m25
	margins, at(immigration_is_threat=(1(1)5)) post
	eststo comment_immi_threat
	coefplot 	(comment_immi_threat, msymbol(circle) msize(medlarge) mcolor(black)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) nokey) ///
								, vert ytitle("Probability of" "Commenting the post", size(medium)) xtitle("Policy position") title("Continous model", size(large)) ///
				ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(comment_immi_threat, replace)
	logit comment_immi_both_yes i.immigration_is_threat
	eststo m26
	margins, at(immigration_is_threat=(1(1)5)) pwcompare(groups effects)
	margins, at(immigration_is_threat=(1(1)5)) post
	eststo comment_immi_threat_ind
	coefplot 	(comment_immi_threat_ind, msymbol(circle) msize(medsmall) mcolor(black)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) nokey) ///
								, vert ytitle("Probability of" "Commenting the post", size(medium)) xtitle("Policy position") title("Categorial model", size(large)) ///
				ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(comment_immi_threat_ind, replace)
				
				
	*share
	logit share_immi_both_yes immigration_is_threat
	eststo m25
	margins, at(immigration_is_threat=(1(1)5)) post
	eststo share_immi_threat
	coefplot 	(share_immi_threat, msymbol(circle) msize(medlarge) mcolor(black)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) nokey) ///
							, vert ytitle("Probability of" "Sharing the post", size(medium)) xtitle("Policy position") title("Continous model", size(large)) ///
			ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
			coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
			name(share_immi_threat, replace)
	logit share_immi_both_yes i.immigration_is_threat
	eststo m26
	margins, at(immigration_is_threat=(1(1)5)) pwcompare(groups effects)
	margins, at(immigration_is_threat=(1(1)5)) post
	eststo share_immi_threat_ind
	coefplot 	(share_immi_threat_ind, msymbol(circle) msize(medsmall) mcolor(black)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) nokey) ///
							, vert ytitle("Probability of" "Sharing the post", size(medium)) xtitle("Policy position") title("Categorial model", size(large)) ///
			ylabel(0(.02).1,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
			coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
			name(share_immi_threat_ind, replace)
			
			

	graph combine like_immi_threat like_immi_threat_ind, ycommon title("Like") col(1) name(like_threat, replace)
	graph combine comment_immi_threat comment_immi_threat_ind, ycommon title("Comment") col(1) name(comment_threat, replace)
	graph combine share_immi_threat share_immi_threat_ind, ycommon title("Share") col(1) name(share_threat, replace)
	
	graph close
	*FIGURE C4:Liking, Commenting and Sharing post on immigrants as a function of Policy Position
	graph combine like_threat comment_threat share_threat, imargins(small) col(3) title("") note("Note: Estimates with 95% confidence intervals (n=2,972)")
	graph export FIGURE_C4.png, replace

	


  
***LIKES AND COMMENTS: EFFECTS ON LIKING, SHARING AND COMMENTING********************************************************

**number of likes //no effects at all!
	*likes
	logit like_vet_both_yes many_likes_vet //model insignificant
	eststo m31
	margins, at(many_likes_vet=(0 1)) post
	eststo like_vet_like
	coefplot 	(like_vet_like, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Liking the post", size(large)) xtitle("") title("Liking post on veterans", size(large)) ///
				ylabel(0(.05).25,labsize(medium)  gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes", labsize(large)) ///
				name(like_vet_like, replace)
	logit like_immi_both_yes many_likes_immi //model insignificant
	eststo m32
	margins, at(many_likes_immi=(0 1)) post
	eststo like_immi_like
	coefplot 	(like_immi_like, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Liking the post", size(large)) xtitle("") title("Liking post on immigrants", size(large)) ///
				ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes", labsize(large)) ///
				name(like_immi_like, replace)	
	graph combine like_vet_like like_immi_like, col(1) ycommon title("") name(liking, replace)
	
	**comments	
	logit comment_vet_both_yes many_likes_vet //model insignificant 
	eststo m33
	margins, at(many_likes_vet=(0 1)) post
	eststo comment_vet_like
	coefplot 	(comment_vet_like, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Commenting the post", size(large)) xtitle("") title("Commenting post on veterans", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes", labsize(large)) ///
				name(comment_vet_like, replace)
	logit comment_immi_both_yes many_likes_immi //model insignificant
	eststo m34
	margins, at(many_likes_immi=(0 1)) post
	eststo comment_immi_like
	coefplot 	(comment_immi_like, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Commenting the post", size(large)) xtitle("") title("Commenting post on immigrants", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes", labsize(large)) ///
				name(comment_immi_like, replace)	
	graph combine comment_vet_like comment_immi_like, col(1) ycommon title("") name(commenting, replace)

	**share
	logit share_vet_both_yes many_likes_vet //model insignificant
	eststo m35
	margins, at(many_likes_vet=(0 1)) post
	eststo share_vet_like
	coefplot 	(share_vet_like, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Sharing the post", size(large)) xtitle("") title("Sharing post on veterans", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes", labsize(large)) ///
				name(share_vet_like, replace)
	logit share_immi_both_yes many_likes_immi //model insignificant
	eststo m36
	margins, at(many_likes_immi=(0 1)) post
	eststo share_immi_like
	coefplot 	(share_immi_like, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Sharing the post", size(large)) xtitle("") title("Sharing post on immigrants", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes", labsize(large)) ///
				name(share_immi_like, replace)	
	graph combine share_vet_like share_immi_like, col(1) ycommon title("") name(sharing, replace)
	
	graph close
	*FIGURE 4: Number of Likes has no Effect on Liking, Commenting and Sharing
	graph combine liking commenting sharing,  col(3) title("") note("Note: Estimates with 95% confidence intervals (n=3,012)")
	graph export Figure_4.png, replace
	
**Comments //some effects	
	*like
	logit like_vet_both_yes i.comments_vet //lells likely to like when exposed to negative comments
	eststo m41
	margins, at(comments_vet=(0 1 2)) pwcompare(groups effects)
	margins, at(comments_vet=(0 1 2)) post
	eststo like_vet_comment
	coefplot 	(like_vet_comment, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Liking the post", size(medlarge)) xtitle("") title("Liking post on veterans", size(large)) ///
				ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "', labsize(medium)) ///
				name(like_vet_comment, replace)
	logit like_immi_both_yes i.comments_immi //model insignificant
	eststo m42
	margins, at(comments_immi=(0 1 2)) post
	eststo like_immi_comment
	coefplot 	(like_immi_comment, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Liking the post", size(medlarge)) xtitle("") title("Liking post on immigrants", size(medium)) ///
				ylabel(0(.05).25,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "', labsize(medium)) ///
				name(like_immi_comment, replace)	
	graph combine like_vet_comment like_immi_comment, col(1) ycommon title("") name(liking_comment, replace)
	
	*comment
	logit comment_vet_both_yes i.comments_vet //Less likely to comment when exposed to negative comments (marginally significant)
	eststo m43
	margins, at(comments_vet=(0 1 2)) pwcompare(groups effects)
	margins, at(comments_vet=(0 1 2)) post
	eststo comment_vet_comment
	coefplot 	(comment_vet_comment, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Commenting the post", size(medlarge)) xtitle("") title("Commenting post on veterans", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "', labsize(medium)) ///
				name(comment_vet_comment, replace)
	logit comment_immi_both_yes i.comments_immi //model insignificant
	eststo m44
	margins, at(comments_immi=(0 1 2)) post
	eststo comment_immi_comment
	coefplot 	(comment_immi_comment, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Probability of" "Commenting the post", size(medlarge)) xtitle("") title("Commenting post on immigrants", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "', labsize(medium)) ///
				name(comment_immi_comment, replace)	
	graph combine comment_vet_comment comment_immi_comment, col(1) ycommon title("") name(commenting_comment, replace)
	
	*share
	logit share_vet_both_yes i.comments_vet //Less likely to comment when exposed to negative comments (marginally significant)
	eststo m45
	margins, at(comments_vet=(0 1 2)) pwcompare(groups effects)
	margins, at(comments_vet=(0 1 2)) post
	eststo share_vet_comment
	coefplot 	(share_vet_comment, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Likelihood of" "Sharing the post", size(medlarge)) xtitle("") title("Sharing post on veterans", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "', labsize(medium)) ///
				name(share_vet_comment, replace)
	logit share_immi_both_yes i.comments_immi //model insignificant
	eststo m46
	margins, at(comments_immi=(0 1 2)) post
	eststo share_immi_comment
	coefplot 	(share_immi_comment, msymbol(circle) msize(medlarge) mcolor(gs16)   mlcolor(black) ciopts(recast(rspike) color(black) ) nokey) ///
				, vert ytitle("Likelihood of" "Sharing the post", size(medlarge)) xtitle("") title("Sharing post on immigrants", size(large)) ///
				ylabel(0(.01).05,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "', labsize(medium)) ///
				name(share_immi_comment, replace)	
	graph combine share_vet_comment share_immi_comment, col(1) ycommon title("") name(sharing_comment, replace)
	graph close

	
	*FIGURE 5: Comments have Small Effects on Liking, Commenting and Sharing
	graph combine liking_comment commenting_comment sharing_comment,  cols(3) graphregion(margin(0 0 0 0)) title("") note("Note: Estimates with 95% confidence intervals (n=3,012)")
	graph export Figure_5.png, replace
	
	graph close	
	
	

***EFFECTS ON POLICY ATTITUDES********************************************************


	*Vets
	reg veterans i.vet_MetteF##c.PS_A  
	eststo mv1a
	margins, at(vet_MetteF=(1) PS_A=(0(1)10)) post
	eststo vet_ps_a_mf
	estimates restore mv1a 
	margins, at(vet_MetteF=(0) PS_A=(0(1)10)) post
	eststo vet_ps_a_ll
	coefplot 	(vet_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.1) label("Post from {it:Social Democrats}")) /// ) ///
				(vet_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.1) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Attitude on Veterans", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Veterans", size(large)) ///
				ylabel(0.3(.1).7,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(vet_ps_A, replace) fxsize(100)
	reg veterans i.vet_MetteF##c.PS_V 
	estimates store mv1b
	margins, at(vet_MetteF=(1) PS_V=(0(1)10)) post
	eststo vet_ps_v_mf
	estimates restore mv1b 
	margins, at(vet_MetteF=(0) PS_V=(0(1)10)) post
	eststo vet_ps_v_ll
	coefplot 	(vet_ps_v_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.1) label("Post from {it:Social Democrats}")) /// ) ///
				(vet_ps_v_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.1) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Veterans", size(large)) ///
				ylabel(0.3(.1).7,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(vet_ps_V, replace) fxsize(90)
	*Immigrants
	reg immigrants i.immigrants_MetteF##c.PS_A   
	eststo mi2a
	margins, at(immigrants_MetteF=(1) PS_A=(0(1)10)) post
	eststo immi_ps_a_mf
	estimates restore mi2a
	margins, at(immigrants_MetteF=(0) PS_A=(0(1)10)) post
	eststo immi_ps_a_ll
	coefplot 	(immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.1) label("Post from {it:Social Democrats}")) /// ) ///
				(immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.1) label("Post from {it:Venstre}")) ///)
				, vert ytitle("Attitudes on Immigrants", size(medium)) xtitle("Sympathy for {it:Social Democrats}") title("Immigrants", size(large)) ///
				ylabel(0.3(.1).7,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(immi_ps_A, replace) fxsize(100)		
	reg immigrants i.immigrants_MetteF##c.PS_V 
	estimates store mi2b
	margins, at(immigrants_MetteF=(1) PS_V=(0(1)10)) post
	eststo immi_ps_a_mf
	estimates restore mi2b
	margins, at(immigrants_MetteF=(0) PS_V=(0(1)10)) post
	eststo immi_ps_a_ll
	coefplot 	(immi_ps_a_mf, msymbol(circle) msize(medsmall) mcolor(gs8)   mlcolor(black) ciopts(recast(rarea) color(gs8%40) ) offset(-.1) label("Post from {it:Social Democrats}")) /// ) ///
				(immi_ps_a_ll, msymbol(circle) msize(medsmall) mcolor(gs14)  mlcolor(black) ciopts(recast(rarea) color(gs10%40)) offset(.1) label("Post from {it:Venstre}")) ///)
				, vert ytitle("", size(medium)) xtitle("Sympathy for {it:Venstre}") title("Immigrants", size(large)) ///
				ylabel(0.3(.1).7,labsize(medium) gmin gmax) legend(row(1) pos(12)) ///
				coeflabels 	(1._at= "0" 2._at= "1" 3._at= "2" 4._at= "3" 5._at= "4"	6._at= "5" 7._at= "6" 8._at= "7" 9._at= "8"	10._at= "9"	11._at= "10" ) ///
				name(immi_ps_V, replace)	fxsize(90)		
	graph close
	*FIGURE D1: Policy attitudes as a function of Sponsor and Party Sympathy
	grc1leg2  vet_ps_A vet_ps_V immi_ps_A immi_ps_V , ycommon pos(12) title("") note("Note: Estimates with 95% confidence intervals (n=2,710/2,774)")
	graph export FIGURE_D1.png, replace		


		
**Number of likes //no effects at all
	*Veterans
	reg veterans i.many_likes_vet //model insignificant
	margins, at(many_likes_vet=(0 1)) post
	eststo vet_likes
	coefplot 	(vet_likes, msymbol(circle) msize(medlarge) mcolor(gs16) mlcolor(black) ciopts(recast(rspike) color(black)) label("")) ///
				, vert ytitle("Attitude on Veterans", size(medium)) xtitle("") title("Veterans", size(large)) ///
				ylabel(0.4(.1).7,labsize(medium) gmin gmax) legend(off) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes") ///
				name(vet_likes, replace) fxsize(100)
	*Immigrants
	reg immigrants i.many_likes_immi //model insignificant
	margins, at(many_likes_immi=(0 1)) post
	eststo immi_likes
	coefplot 	(immi_likes, msymbol(circle) msize(medlarge) mcolor(gs16) mlcolor(black) ciopts(recast(rspike) color(black)) label("")) ///
				, vert ytitle("Attitude on Immigrants", size(medium)) xtitle("") title("Immigrants", size(large)) ///
				ylabel(0.4(.1).7,labsize(medium) gmin gmax) legend(off) ///
				coeflabels 	(1._at= "Few likes" 2._at= "Many likes") ///
				name(immi_likes, replace) fxsize(100)
				
	graph combine vet_likes immi_likes, ycommon  title("No effects of Likes") name(att_likes, replace)

**Comments //no effects at all	
	*Veterans
	reg veterans i.comments_vet //model insignificant
	margins, at(comments_vet=(0 1 2)) post
	eststo vet_comments
	coefplot 	(vet_comments, msymbol(circle) msize(medlarge) mcolor(gs16) mlcolor(black) ciopts(recast(rspike) color(black)) label("")) ///
				, vert ytitle("Attitude on Veterans", size(medium)) xtitle("") title("Veterans", size(large)) ///
				ylabel(0.4(.1).7,labsize(medium) gmin gmax) legend(off) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "') ///
				name(vet_comments, replace) fxsize(100)
	*Immigrants
	reg immigrants i.comments_immi //model insignificant
	margins, at(comments_immi=(0 1 2)) post
	eststo immi_comments
	coefplot 	(immi_comments, msymbol(circle) msize(medlarge) mcolor(gs16) mlcolor(black) ciopts(recast(rspike) color(black)) label("")) ///
				, vert ytitle("Attitude on Immigrants", size(medium)) xtitle("") title("Immigrants", size(large)) ///
				ylabel(0.4(.1).7,labsize(medium) gmin gmax) legend(off) ///
				coeflabels 	(1._at=`" "No" "Comments" "' 2._at=`" "Positive" "Comments" "' 3._at=`" "Negative" "Comments" "') ///
				name(immi_comments, replace) fxsize(100)
				
	graph combine vet_comments immi_comments, ycommon  title("No effects of Comments") name(att_comments, replace)

graph close

*Figure D2: Popularity of Post does not Affect Policy Atttitudes
graph combine att_likes att_comments, ysize(6) cols(1) graphregion(margin(0 0 0 0))  title("")
	graph export FIGURE_D2.png, replace
	
	
	
*************	
***THE END***
*************
log close
